﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModuleAdd.ascx.cs" Inherits="controls_admin_ModuleAdd" %>
<!-- forms -->
<script type="text/javascript">
    $(document).ready(function () {
        $("#dialog-modal").dialog({
            autoOpen: false,
            height: 500,
            width: 700,
            modal: true
        });
        $("select.type").change(function () {
            var thumb = $("select.type option:selected").attr("class");
            $("#thumbModule").attr("src", "../upload/home/" + thumb);
        });
        $("#pictureLocation").click(function () {
            var location = $("select.type option:selected").attr("name");
            $("#imgLocation").attr("src", "../upload/home/" + location);
            $("#dialog-modal").dialog("open");
            return false;
        });
    });    
</script>
<div id="dialog-modal" title="Basic Modal Dialog">
    <img alt="Ảnh vị trí" src="" id="imgLocation" height="500" />
</div>
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 runat="server" id="h5_title">
            Thêm Mới Modules
        </h5>
    </div>
    <div id="divMessage" runat="server">
    </div>
    <!-- end box / title -->
    <div class="form">
        <div class="fields">
            <div class="field field-first">
                <div class="label">
                    <label for="input-medium">
                        Tiêu Đề:</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtTitle" runat="server" CssClass="medium required" MaxLength="50" />
                    <div runat="server" id="NOTE_TITLE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Loại Module</label>
                </div>
                <div class="input">
                    <asp:DropDownList ID="ddlType" runat="server" CssClass="type" />
                    <img alt="Ảnh đại diện" src="" id="thumbModule" height="100" />
                    <div runat="server" id="NOTE_TYPE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Danh mục nội dung</label>
                </div>
                <div class="input">
                    <asp:DropDownList ID="ddlCategories" runat="server" />
                    <div runat="server" id="NOTE_CONTENT" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Hiển thị tại</label>
                </div>
                <div class="input">
                    <asp:ListBox ID="lbxCategories" runat="server" SelectionMode="Multiple" Width="300px"
                        AppendDataBoundItems="true" Height="250px" />
                    <div runat="server" id="NOTE_CATEGORY" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Vị trí module</label>
                </div>
                <div class="input">
                    <asp:DropDownList ID="ddlLocation" runat="server" CssClass="select" />
                    <a id="pictureLocation" style="text-decoration: underline" href="#">Xem vị trí của module
                        này</a>
                    <div runat="server" id="NOTE_LOCATION" class="note">
                    </div>
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Số bản ghi trên 1 trang</label>
                </div>
                <div class="input">
                    <asp:TextBox ID="txtPageSize" runat="server" Width="50px" CssClass="required number"
                        Text="6" MaxLength="5" />
                    <div runat="server" id="NOTE_PAGESIZE" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label label-radio">
                    <label>
                        Hiển thị:</label>
                </div>
                <div class="input">
                    <asp:CheckBox runat="server" ID="cboDisDetails" Checked="true" />
                    <div runat="server" id="NOTE_DISPLAY_DETAILS" class="note" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label for="input-medium">
                        Thứ tự hiển thị</label>
                </div>
                <div class="input">
                    <asp:TextBox Width="50px" ID="txtSDHome" runat="server" CssClass="required number"
                        Text="1" />
                    <div runat="server" id="NOTE_SORT" class="note" />
                </div>
            </div>
            <div class="buttons">
                <div class="highlight">
                    <asp:Button ID="btnModuleAction" runat="server" Text="Thêm Mới" OnClick="btnModuleAction_Click" />
                </div>
            </div>
        </div>
    </div>
</div>
<!-- end forms -->
